﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using BoxBinary.AspectCache.Core;
using BoxBinary.AspectCache.Core.CacheManagement;

namespace BoxBinary.AspectCache.Samples.WebForms
{
    public partial class Demo1 : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            var test = DateTime.Now.ToString();
            var cacheKey = new CacheKeyParamsCollection("id", "1");
            CacheManager.Insert(test, cacheKey);
            var outtest = CacheManager.Retrieve(typeof (string), cacheKey);

            Response.Write(test + @"\n<br/>");
            Response.Write(outtest + @"\n<br/>");

        }
    }
}